//
//  BaseModel.m
//  WZTMovie
//
//  Created by 吴展图 on 13-9-3.
//  Copyright (c) 2013年 ios5. All rights reserved.
//

#import "TYBaseModel.h"

@implementation TYBaseModel
+ (instancetype)gjBaseModelWithDict:(NSDictionary *)dict
{
    return  [[self alloc]initWithDict:dict];
}
- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        if (dict && (NSNull *)dict != [NSNull null] && [dict isKindOfClass:[NSDictionary class]]){
            [self setValuesForKeysWithDictionary:dict];
        }else
            NSLog(@"parameters is error.");

    }
    return self;
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    if (!value || [value isKindOfClass:[NSNull class]]) {
        return;
    }
    [super setValue:value forKey:key];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

@end
